Skip to content

Add Databricks CLI v0.286.0 as a nix module (CLOUD-3765)#477

Merged
luketchang merged 2 commits into
mainfrom
luketchang/add-databricks-cli
Mar 21, 2026
Merged

Add Databricks CLI v0.286.0 as a nix module (CLOUD-3765)#477
luketchang merged 2 commits into
mainfrom
luketchang/add-databricks-cli

Conversation

@luketchang

@luketchang luketchang commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Why

Databricks apps on Replit need the databricks CLI available by default. Currently users have to manually download it. Adding it as a nix module makes it available in the nix cacache so Repls have this CLI out of the box.

Slack thread: https://slack.com/archives/D0AFAFQP10E/p1773937534232109

What changed

  • Added a new databricks-cli module under pkgs/modules/databricks-cli/default.nix that builds the Databricks CLI v0.286.0 from source using buildGoModule + fetchFromGitHub, following the upstream nixpkgs pattern
  • Registered the module in pkgs/modules/default.nix
  • Added databricks-cli to allowUnfreePredicate in flake.nix since the Databricks license is classified as unfree
  • Adapted for v0.286.0 differences from nixpkgs v0.278.0:
    • Excluded tools/testmask (new package that isn't distributable)
    • Skipped TestCacheDirEnvVar test (fails in nix sandbox due to missing home/cache directory)

Test plan

  • Built both the dev and deployment module targets successfully:
    • nix build '.#activeModules.databricks-cli' — compiles from source, all tests pass (~2m45s check phase)
    • nix build '.#activeDeploymentModules.databricks-cli' — builds successfully
  • Verified the binary executes correctly and reports the expected version:
    $ databricks --version
    Databricks CLI v0.286.0
    

Rollout

  • This is fully backward and forward compatible

~ written by Zerg 👾

Add a new module that packages the pre-built Databricks CLI binary
from GitHub releases so Repls can have the databricks command
available by default for Databricks apps.
@luketchang luketchang added the zergling-authored Authored by Zerg agent label Mar 19, 2026
@luketchang luketchang marked this pull request as ready for review March 20, 2026 02:45
@luketchang luketchang requested a review from a team as a code owner March 20, 2026 02:45
@luketchang luketchang requested review from vlinkz and removed request for a team March 20, 2026 02:45
@luketchang luketchang changed the title Add Databricks CLI v0.286.0 as a nix module Add Databricks CLI v0.286.0 as a nix module (CLOUD-3765) Mar 20, 2026
Rework the derivation to use buildGoModule + fetchFromGitHub instead of
downloading a pre-built binary tarball. This follows the upstream nixpkgs
package.nix pattern with version bumped to 0.286.0.

Changes:
- Build from source with buildGoModule for reproducibility
- Add meta.license = lib.licenses.databricks
- Add databricks-cli to allowUnfreePredicate in flake.nix
- Exclude tools/testmask (new in v0.286.0, not a distributable package)
- Skip TestCacheDirEnvVar (fails in nix sandbox, no home directory)
@luketchang luketchang requested a review from ryantm March 20, 2026 21:40
@luketchang luketchang merged commit dddb1f6 into main Mar 21, 2026
3 checks passed
@luketchang luketchang deleted the luketchang/add-databricks-cli branch March 21, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zergling-authored Authored by Zerg agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants